<?php
namespace app\seo\controller;  // 必须继承于app 第二个是具体的应用名  例 t5/note/tp
use think\Controller;
use think\config;


// use think\Db;
class Index extends Controller
{

	
    public function index()
    {
		echo"http://www.hyhthjk.com.cn/note.php/seo/Index/index";
	}


	//主动提交
	public function index2()
    {
			
		$urls = array(
			'http://www.hyhthjk.com.cn/stock.php/index',
			'http://www.hyhthjk.com.cn/stock.php/index/Blog/wen2019121501',
			'http://www.hyhthjk.com.cn/stock.php/index/Blog/wen2019122101',
		);
		$api = 'http://data.zz.baidu.com/urls?site=www.hyhthjk.com.cn&token=F9bADE21mxnwUF0a';
		$ch = curl_init();
		$options =  array(
			CURLOPT_URL => $api,
			CURLOPT_POST => true,
			CURLOPT_RETURNTRANSFER => true,
			CURLOPT_POSTFIELDS => implode("\n", $urls),
			CURLOPT_HTTPHEADER => array('Content-Type: text/plain'),
		);
		curl_setopt_array($ch, $options);
		$result = curl_exec($ch);
		echo $result;
	}

}